package pers.cz.service.impl;

import pers.cz.business.SingleRequestBusiness;
import pers.cz.model.RequestRecord;
import pers.cz.pub.BeanHelper;
import pers.cz.service.SingleRequestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: PostGirl-panent
 * @description: SingleRequestService
 * @author: Cheng Zhi
 * @create: 2021-06-14 10:10
 **/
@Service
public class SingleRequestServiceImpl implements SingleRequestService {

    @Autowired
    BeanHelper beanHelper;

    @Override
    public List<RequestRecord> getRequestRecord() {

        SingleRequestBusiness business = new SingleRequestBusiness();
        business.setMapper(beanHelper);

        return business.getRequestRecord();
    }

    @Override
    public void insertRequestRecord(Integer userId, String url, String params, String type, String originate) {
        SingleRequestBusiness business = new SingleRequestBusiness();
        business.setMapper(beanHelper);

        business.insertRequestRecord(userId, url, params, type, originate);
    }

}
